<template>
	<view>
		<button class="but" type="primary" @click="myclick"></button>
	</view>
</template>

<script>
	
	export default {
		name: 'api',
		data() {
			return {

			}
		},
		methods: {
			myclick() {
// 				let now = Date.now();
// 				let appKey = SHA1("A6099946446807"+"UZ"+"742CA739-68A4-3302-CC32-E5325CDE09F3"+"UZ"+now)+"."+now
// 				this.$wxRequest.defaults.baseURL = 'https://d.apicloud.com/mcm/api';
// 				this.$wxRequest.defaults.headers.common['X-APICloud-AppId'] = 'A6099946446807';
// 				this.$wxRequest.defaults.headers.common['X-APICloud-AppKey'] = appKey;
				this.$api.getuser('5c14e6e1c7374d6a31067e03')
					.then(function(response) {
						console.log('新接口2');
						console.dir(response.data);
					})
					.catch(function(error) {
						console.log(error);
					});
			}
		}
	}
</script>

<style>
	.but {
		width: 500upx;
		height: 500upx;
		background: #FF0000;
	}
</style>
